<?php namespace Admin\Controller; 

use Admin\Model\Admin;

class MyController extends AuthController{
	protected $db;

    public function __init(){
        $this->db = new Admin;
    }
	
    //动作
    public function index(){
    	if (IS_POST) 
    	{
    		if ($this->db->changePassword()) 
    		{
    			$this->success('密码更改成功');
    		}
    		else{
    			$this->error($this->db->getError());
    		}
    	}
    	else{
    		View::make();
    	}      
    }




}
